<%def name="filter(title='untitled', output='', multi=False, multitag=False, displaymulti=False, choices=[])" >

<% filter_title = escape(title) %>

% if not output:

<h3> By ${filter_title}

% if displaymulti:


% if multi:

<span class="modifier">(<a class="selected" href="?${multitag}">single</a>|<b>multi</b>)</span>

% else:

<span class="modifier">(<b>single</b>|<a class="selected" href="?${multitag}">multi</a>)</span>

% endif


% endif

</h3>
<ul>

% for num,choice in enumerate(choices):

    <li
% if choice['selected']:
 class="selected"
% endif
 style="background: ${ '#efefef' if num%2 else '#e4e4e4' };">
    <a href="${choice['query_string']}">${choice['display']}</a></li>

% endfor

</ul>

% else:

${output}

% endif

</%def>
